<template>
  <div>
   <el-form :inline="true" :model="formInline" class="demo-form-inline">
  <el-form-item label="患者姓名：">
    <el-input v-model="formInline.name" placeholder="请输入姓名" :disabled="this.blo" :class="['formwidth', this.blo?'hoppnt':'']"></el-input>
  </el-form-item>
  <el-form-item label="性别：">
    <el-select v-model="formInline.sex" placeholder="男" :disabled="this.blo" :class="['formwidthtwo', this.blo?'hoppnt':'']">
      <el-option label="男" value="shanghai"></el-option>
      <el-option label="女" value="beijing"></el-option>
    </el-select>
  </el-form-item>
    <el-form-item label="年龄：">
    <el-input v-model="formInline.age" placeholder="请输入年龄" :disabled="this.blo" :class="['formwidth', this.blo?'hoppnt':'']"></el-input>
  </el-form-item>
    <el-form-item label="科别：">
    <el-select v-model="formInline.kebie" placeholder="外科" :disabled="this.blo" :class="['formwidth', this.blo?'hoppnt':'']">
      <el-option label="外科" value="waike"></el-option>
      <el-option label="内科" value="neike"></el-option>
      <el-option label="妇科" value="fuke"></el-option>
      <el-option label="神经科" value="shenjingke"></el-option>
    </el-select>
  </el-form-item>
    <el-form-item label="诊断类型：">
    <el-select v-model="formInline.leixing" placeholder="初诊" :disabled="this.blo" :class="['formwidth',this.blo?'hoppnt':'']">
      <el-option label="复诊" value="fuzhen"></el-option>
      <el-option label="初诊" value="chuzhen"></el-option>
      <el-option label="急诊" value="jizhen"></el-option>
    </el-select>
  </el-form-item>
    <el-form-item>
<div><i class="el-icon-edit"  @click="edit">修改信息</i></div>
  </el-form-item>
  <!-- 查询按钮 -->
    <!-- <el-form-item>
    <el-button type="primary" @click="onSubmit">查询</el-button>
  </el-form-item> -->
</el-form>
<!-- 表单 -->
<el-form :label-position="labelPosition" label-width="100px" :rules="rules" ref="formLabelAlign" :model="formLabelAlign">
  <el-form-item label="临床诊断：" prop="zhenduan">
    <el-input v-model="formLabelAlign.zhenduan" :disabled="this.blo" :class="['fromheigth',this.blo?'hoppnt':'']"></el-input>
  </el-form-item>
  <el-form-item label="大体检查：" prop="jiancha">
    <el-input v-model="formLabelAlign.jiancha" :disabled="this.blo" :class="['fromheigth', this.blo?'hoppnt':'']"></el-input>
  </el-form-item>
  <el-form-item label="病理检查：" prop="bingli">
    <el-input v-model="formLabelAlign.bingli" :disabled="this.blo" :class="['fromheigth', this.blo?'hoppnt':'']"></el-input>
  </el-form-item>
  <el-form-item label="免疫/组化：" prop="mianyi">
    <el-input v-model="formLabelAlign.mianyi" :disabled="this.blo" :class="['fromheigth', this.blo?'hoppnt':'']"></el-input>
  </el-form-item>
  <el-form-item label="结果：" prop="jieguo" >
    <el-input v-model="formLabelAlign.jieguo" :disabled="this.blo" :class="['fromheigth', this.blo?'hoppnt':'']"></el-input>
  </el-form-item>
  <el-form-item label="备注：" prop="beizhu" class="borderBottom">
    <el-input v-model="formLabelAlign.beizhu" :disabled="this.blo" :class="['fromheigth', this.blo?'hoppnt':'']"></el-input>
  </el-form-item>
  <el-row :gutter="20" type="flex" align="middle">
  <el-col :span="4" ><div class="grid-content bg-purple">报告医师：{{this.sr.doctors}}</div></el-col>
  <el-col :span="4" :offset="2"><div class="grid-content bg-purple">审核医师：{{this.sr.doctors}}</div></el-col>
  <el-col :span="6" :offset="2"><div class="grid-content bg-purple">报告时间：{{this.sr.Datetiom}}</div></el-col>
  <el-col :span="4" :offset="2"><el-button type="success" class="btncolor" @click="lookfujian">查看附件</el-button></el-col>
</el-row>
</el-form>

  </div>
</template>

<script>
export default {
data() {
  return {
    sr:"",
    blo:true,
    disabled:"disabled",
    //[上传文件地址
    fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}],
    labelPosition: 'right',
        formLabelAlign: {
          zhenduan: '',
          jianhca: '',
          bingli: '',
          mianyi: '',
          jieguo: '',
          miaoshu:"",
          beizhu: ''
        },
     formInline: {
          name: "",
          sex: '',
          age: '',
          kebie: '',
          leixing: ''
        },
          rules: {
          zhenduan: [{ required: true, message: '请填写临床诊断', trigger: 'blur' }],
          jiancha: [{ required: true, message: '请填写大体检查', trigger: 'blur' }],
          bingli: [{ required: true, message: '请填写病理检查', trigger: 'blur' }],
          mianyi: [{ required: true, message: '请填写免疫/组化', trigger: 'blur' }],
          jieguo: [{ required: true, message: '请填写结果', trigger: 'blur' }],
          beizhu: [{ required: true, message: '请填写备注', trigger: 'blur' }]
        }
  }
},
   mounted() {
   this.localrow=sessionStorage.getItem("row");
   var obj=JSON.parse(this.localrow)
      this.sr=obj
      this.formInline.name=this.sr.name
      this.formInline.sex=this.sr.sex
      this.formInline.age=this.sr.age
      this.formInline.kebie=this.sr.className
      this.formInline.leixing=this.sr.zhenduan
      this.formLabelAlign.zhenduan=this.sr.demo
  
  },
methods: {
  //  onSubmit() {
  //       console.log('submit!');
  //     }
  //查看附件
  lookfujian(){

  },
  //上传文件事件
    edit(){
      this.blo=!this.blo
    }

},
}
</script>

<style lang="scss" scoped>
.formwidth{
  width: 120px !important;
}
.formwidthtwo{
  width: 65px !important;
}
.fromheigth /deep/ input{
  height: 70px !important;
}
.el-icon-edit{
  // width: 100px;
  cursor: pointer;
  color: red;
}
.hoppnt /deep/ input{
  background-color:transparent !important;
 border: none;
  background: rgba(255, 255, 255, 0.055);
}
.borderBottom{
  border-bottom:1px solid black;
}
.btncolor{
  background: #16dcb8;
  border: none;
}
</style>